/**
 * C Programming: A Modern Approach
 *
 * version: 2nd
 * author: K.N.King
 * http://knking.com/books/c2
 */

#include <stdio.h>

/**
 *
 */

int main(void) {
    int country_code;
    int area_num;
    int phone_num;

    printf("Enter phone number [(xxx) xxx-xxxx]: ");
    scanf("(%d) %d-%d", &country_code, &area_num, &phone_num);

    printf("You entered %d.%d.%d\n", country_code, area_num, phone_num);

    return 0;
}

/*
output:
Enter phone number [(xxx) xxx-xxxx]: (404) 817-6900
You entered 404.817.6900
*/